package liecai_class.day06;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * ConcurrentMap - ConcurrentHashMap
 *
 * HashMap线程不安全，HashTable线程安全，但效率低
 * ConcurrentHashMap线程安全，效率高，用起来和HashMap基本一致
 */
public class Demo11 {
    public static void main(String[] args) {
        ConcurrentMap map = new ConcurrentHashMap();
        map.put("k1","v1");
        Object v = map.get("k1");
        System.out.println(v);
    }
}
